package com.design.patterns.list.factory.methodfactory;

import com.design.patterns.list.factory.Pizza;

/**
 * @author Wangzhiwen
 */
public class BJOrderPizza extends OrderPizza {
    @Override
    public Pizza createPizza(String pizzaName) {
        Pizza pizza;
        if ("BJAPizza".equals(pizzaName)){
            pizza = new BJAPizza();
        }else if ("BJBPizza".equals(pizzaName)){
            pizza = new BJBPizza();
        }else {
            pizza = new BJCPizza();
        }
        return pizza;
    }
}
